From d701702bd3a04f584b1d827b4f2edc43ce2cffa8 Mon Sep 17 00:00:00 2001 From: parkrrrr Date: Mon, 3 May 2004 23:00:56 +0000 Subject: [PATCH] text, html, palmdoc used to segfault if the source was a magellan .wpt file --- html.c | 2 +- palmdoc.c | 2 +- text.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/html.c b/html.c index 8b32e5448..41a71d886 100644 --- a/html.c +++ b/html.c @@ -116,7 +116,7 @@ html_disp(const waypoint *wpt) xfree( hint ); } } - else if (strcmp(wpt->notes,wpt->description)) { + else if (!wpt->notes && (!wpt->description || strcmp(wpt->notes,wpt->description))) { fprintf (file_out, "

%s

\n", wpt->notes); } fprintf(file_out, "\n"); diff --git a/palmdoc.c b/palmdoc.c index e0a1faa93..da0416c11 100644 --- a/palmdoc.c +++ b/palmdoc.c @@ -454,7 +454,7 @@ palmdoc_disp(const waypoint *wpt) xfree( hint ); } } - else if (strcmp(wpt->notes,wpt->description)) { + else if (wpt->notes && (!wpt->description || strcmp(wpt->notes,wpt->description))) { docprintf (10+strlen(wpt->notes), "%s\n", wpt->notes); } if (! suppresssep) diff --git a/text.c b/text.c index 180a9b977..6c17eb902 100644 --- a/text.c +++ b/text.c @@ -109,7 +109,7 @@ text_disp(const waypoint *wpt) xfree( hint ); } } - else if (strcmp(wpt->notes,wpt->description)) { + else if (wpt->notes && (!wpt->description || strcmp(wpt->notes,wpt->description))) { fprintf (file_out, "%s\n", wpt->notes); } if (! suppresssep) -- 2.30.2